new feature: use name of inputfile as title for HTML file
better error handling, return code will be 1 in case of any error