cleaned up file exists checks