Added file checking functionality, including CSV file foramtting.