File API and File extension validation