Fixing 'removedfile' function; additional check.