added logging to file instead of system.out