Corrected documentation and added $_FILES check