added some file extensions like "htm" and added a todo for a possible
NullPointerException