File upload sanity checking