Revert "Minor correction."

This reverts commit 10eaa3ddaa0633349545b07640f5e7a18ec5f314.
Revert "Add db maintenance routine. Move cleanup functions to maintenance module."

This reverts commit d0e8af59926db062a7de0484f361ad92e7404888.
Check if file name is correct before creating db record. Log client ip address.