adds file validation
adds better client side file validation