Added logging info
Fix for closing context with file resources opened with