checked that errno was used correctly
added description at beginning of source files
updated todo