Added check on uploaded files