Moved file type check to server.R