fixing potential npe in file persistence
returning 404 if monitoring is not turned on