first implementation of existing file check