Error handling improved, input file path required.