Creating a log file to try and capture why an access violation is ocurring.