added code for files without slashes