cleaning logging for pid file