Added Write to Log File

Log File added, needs to be tested.