!!Major overhaul[Read Description]

Changed the logging algorithm. The logging info is now directly written
to a buffered writer. The file io handle definitions are moved to the
logging class. Read comments for more info. The is a 300 % increase in
performance.