Edited version eliminates tab chars at the end of a line and underscore in name of file
