Added logs and check for filename