file.file? is case sensitive. Element constant wasn't recognised, must add Class