Adds file writable detect and the 400 code