Add missing comma and use propper error reporting on file handle error