HW1 details: think about error conditions: what could go wrong l/stat, open, errno, perror