Setup logger, improve error handling and enable processing of multiple files