clean exit on linux, standard file functions