fixed config overwriting by getopt param, added try/catch to be sure logging will always work