Fix printf formats
Remove stop file last during server shutdown to allow database cleanup