fix log file not being closed
fix regression in the arguments parsing
skip modes check (impossible without arguments)