fixed error path when /dev/null could not be opened