Added basic file extension checks