Added error catching and creation of logfile; also fixed
but with fixed timestep instead of variable timestep
being added.