Corrected the order of information in file, added exceptions when the path is not given