Basic command additions

Added:
Function to center a window
Function to write to a log file (good for testing)
Function to exit gracefully while writing to logfile