Code cleanup

- moved to Logger library instead of System.out
- file handling modified