Added check if file was uploaded