filename is set to length of MAXSTRING which is currently set to 2048.  I think it is ok to add 4 characters.