Create pid file