cleaned up some code
moved log file;