change logging levels, set writable only when file exists