Might be a good idea to include the value of errno in the message for easier debugging.