Sanitize file inputs