fixing filename & marked file detection bugs