Used standard_main_function's utility for checking preconditions on program startup.
Added logging! Does it work?