Added exception for file handing