Fixed format string in loop fetcher

Use one 'H' instead of two. Using two 'H' forces a two-digit hour number
and fails if time is 0-9 (24 hour time).
Added check if database is reachable

And don't proceed if it's not. Throw an exception and quit.