Changed log file access from w+ to w