Minor bugs in checking existance of file before sending to browser