Improved error handling, reads file from argumentslist