file names should all be strings
apply logging before writing pid file
minor