added support for more special characters
handle invalid filename