Logging cleanup
Fix file mode after testing