checks if file is provided - fixes #7