Added an extra file check