better logging and moved main class