Get file extension rather than hardcoding the last 3 chars of a string.