Test method to create pid file