Added extra check for filename input

filename will only accepts alphanumeric values, "." and "_"