added input dir parameter to config, so it's now more straightforward; support comments in config