fixing some errors to help with the pid file