Fix check for logfile writability
Fix double spacing after line wrapping (fixes #203)