Checking to make sure we can write to the file before writing the log