added .pid file creation, small log file config bug fix