closing file safely
removed verbose logging
closing file safely