Added doLogic methods

- Added InvertDirection message
- Added error checking for the logfile
- Reduced logger output