files & directories checking improved