Increased FILEPATH_LEN from 256 to 1024
Fixed bug in call to snprintf where MAXSTR was being used as the n parameter
instead of FILEPATH_LEN