Handle pthread_mutex_lock error code and printing properly
Handle pthread_mutex_lock error code and printing properly

Also, do not print anything if mutex is already locke when using
`trylock`

saminiir/level-ip,saminiir/level-ip