fixes argument and file reading