Added support for filename length truncation