Fix creation of keepalive file