Added a find_if instead of while in filedatabase