Closed file handle and printed exit message