Added automatic validation of file upload by checking the $_FILES[]['error'] value