tests files & error handling